package cn.wrl.order;

import cn.wrl.item.service.ItemService;
import cn.wrl.order.fallback.itemservice.ItemCommonFeignClient;
import cn.wrl.user.service.AddressService;
import cn.wrl.user.service.UsersService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
@MapperScan(basePackages = "cn.wrl.order.mapper")
@ComponentScan(basePackages = {"cn.wrl", "org.n3r.idworker"})
//@EnableFeignClients(basePackages = {
//        "cn.wrl.user.service",
//        "cn.wrl.item.service",
//        "cn.wrl.order.fallback.itemservice"
//})
@EnableFeignClients(clients = {
        ItemCommonFeignClient.class,
        ItemService.class,
        UsersService.class,
        AddressService.class,
})
@EnableDiscoveryClient
public class OrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(OrderApplication.class, args);
    }
}
